package com.ellwood.common.core.xss;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @ProjectName: Ellwood-framework-boot
 * @PackageName: com.ellwood.common.core.xss
 * @ClassName: Xss
 * @Description: // 自定义xss校验注解
 * @Author: Ellwood
 * @CreateDate: 2024/7/13 - 上午1:12
 * @Version: V1.0.0
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(value = {
        ElementType.METHOD,
        ElementType.FIELD,
        ElementType.CONSTRUCTOR,
        ElementType.PARAMETER
})
@Constraint(validatedBy = {XssValidator.class})
public @interface Xss {

    String message() default "不允许任何脚本运行";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
